package com.cqd.mapper;

import com.cqd.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface UserMapper extends JpaRepository<User,Integer> {

    List<User> findByNameLike(@RequestParam String name);

    List<User> findByBirthdayBetween(@RequestParam String d1,@RequestParam String d2);

    List<User> findByAgeLessThan(Sort sort);

    Page<User> findAll(Pageable pageable);
}
